package com.easy;

import com.easy.util.ExpiryMap;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

@SpringBootApplication
@EnableCaching//开启缓存
@EnableScheduling
public class BarbershopApplication {
    public static void main(String[] args) {
        SpringApplication.run(BarbershopApplication.class, args);
//        ScheduledExecutorService service = Executors.newSingleThreadScheduledExecutor();
//        service.scheduleAtFixedRate(BarbershopApplication::testCache,0,1, TimeUnit.HOURS);


    }
//    public static void testCache(){
//        Date date = new Date();
//        SimpleDateFormat format = new SimpleDateFormat("hh");
//        String hout =
//    }
}
